package org.boyan.modules.a.a;

import com.alibaba.fastjson.JSONObject;
import java.util.List;
import java.util.Map;
import org.boyan.common.system.vo.DictModel;
import org.boyan.modules.cgform.service.impl.i;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: zhuxiaobao
 * @time: 2021/9/24 16:13
 */

@RestController("onlineBaseExtAPIController")
@RequestMapping({"/online/api"})
public class a {
    @Autowired
    i onlineBaseExtAPI;

    @PostMapping({"/cgform/crazyForm/{name}"})
    String a(@PathVariable("name") String paramString, @RequestBody JSONObject paramJSONObject) throws Exception {
        return this.onlineBaseExtAPI.cgformPostCrazyForm(paramString, paramJSONObject);
    }

    @PutMapping({"/cgform/crazyForm/{name}"})
    String b(@PathVariable("name") String paramString, @RequestBody JSONObject paramJSONObject) throws Exception {
        return this.onlineBaseExtAPI.cgformPutCrazyForm(paramString, paramJSONObject);
    }

    @GetMapping({"/cgform/queryAllDataByTableName"})
    JSONObject a(@RequestParam("tableName") String paramString1, @RequestParam("dataIds") String paramString2) {
        return this.onlineBaseExtAPI.cgformQueryAllDataByTableName(paramString1, paramString2);
    }

    @DeleteMapping({"/cgform/cgformDeleteDataByCode"})
    String b(@RequestParam("cgformCode") String paramString1, @RequestParam("dataIds") String paramString2) {
        return this.onlineBaseExtAPI.cgformDeleteDataByCode(paramString1, paramString2);
    }

    @GetMapping({"/cgreportGetData"})
    Map<String, Object> a(@RequestParam("code") String paramString1, @RequestParam("forceKey") String paramString2, @RequestParam("dataList") String paramString3) {
        return this.onlineBaseExtAPI.cgreportGetData(paramString1, paramString2, paramString3);
    }

    @GetMapping({"/cgreportGetDataPackage"})
    List<DictModel> a(@RequestParam("code") String paramString1, @RequestParam("dictText") String paramString2, @RequestParam("dictCode") String paramString3, @RequestParam("dataList") String paramString4) {
        return this.onlineBaseExtAPI.cgreportGetDataPackage(paramString1, paramString2, paramString3, paramString4);
    }
}

